package com.baiyang.server.dao.article;

import com.alibaba.fastjson.JSONObject;
import com.baiyang.server.dao.BaseDao;
import org.apache.ibatis.annotations.Mapper;

import com.baiyang.server.model.article.Article;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface ArticleDao extends BaseDao<Article> {
    /**
     * @apiNote 根据id获取文章信息
     * @param articleIds
     * @return
     */
    List<JSONObject> selectByIds(List<String> articleIds);

    List<JSONObject> getArticle(@Param(value = "start") int start,@Param(value = "size") int size);

    List<Article> getArticleByType(JSONObject object);

    List<Article> getArticleByAuthor(String authorId);

    Article getNewArticle(Article article);
}
